package com.luweijie.sh.controller;


import com.luweijie.entity.vo.Result;
import com.luweijie.sh.entity.po.Resource;
import com.luweijie.sh.service.impl.UsersServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.xml.ws.soap.Addressing;
import java.util.List;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author luweijie
 * @since 2020-06-11
 */
@RestController
@RequestMapping("/resource/users")
public class UsersController {

    @Autowired
    UsersServiceImpl usersService;
    @GetMapping(value = "/user/{username}")
     public   Result resources(@PathVariable("username") String username){
        Result result = usersService.queryByRole(username);
        return Result.success(result);
    }
}
